package org.mazhi.commons;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@EnableTransactionManagement
@RestController
@EnableAutoConfiguration
@RequestMapping("/test")
public class ArticleCtrl {
	
	@Autowired
	public ArticleDaoImpl articleDaoImpl;
	
	@RequestMapping(value="/a",method=RequestMethod.GET)
	public void getCategoryByGroup(){
//		Article a = new Article();
//		a.setName("dd");
		
//		Article a = new Article(1,"ab",UserType.INCOME,InvoiceType.HELP0);
//		a.setOrganType(OrganType.ORGANTYPE_DEPARTMENT);
		
//		articleDaoImpl.save(a);
		
		Article b = articleDaoImpl.findOne(1L);
		System.out.println(b.getInvoiceType().getStatusDescription());
	}
	
}
